package com.zr.dao.impl;

import java.util.List;

import org.hibernate.Query;
import org.springframework.stereotype.Repository;

import com.zr.dao.FindPointDao;
import com.zr.model.Point;

@Repository("fff")
public class FindPointDaoImpl<T> extends BaseDaOImpl<T> implements FindPointDao<T>{

	@Override
	public Point findPn(String pname) {
		String hql ="from Point where pname=:pname";
		System.out.println("-----");
		System.out.println(this.getCurrentSession());
		Query query = this.getCurrentSession().createQuery(hql);
		query.setString("pname",pname);
		List<Point> p = query.list();
		System.out.println(p);
		return p.get(0);
	}

}
